import { PluginDefinition } from 'yam-types'
import * as schema from './schema.json'
import monitorOperator from './handlers/monitor'
import alertOperator from './handlers/alert'
import { AppMonitor, AppAlert } from './types'
import { name, version } from './package.json'

export default {
  name,
  schema,
  version,
  handlers: {
    'observe.monitor': monitorOperator,
    'observe.alert': alertOperator,
  }
} as PluginDefinition<AppMonitor | AppAlert>